<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="itheima" uri="http://itcast.cn/common/"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<jsp:useBean id="now" class="java.util.Date" scope="page" />
<%
	request.setCharacterEncoding("utf-8");
	response.setCharacterEncoding("utf-8");
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">

<title>客户列表-BootCRM</title>

<!-- Bootstrap Core CSS -->
<link href="<%=basePath%>css/bootstrap.min.css" rel="stylesheet">

<!-- MetisMenu CSS -->
<link href="<%=basePath%>css/metisMenu.min.css" rel="stylesheet">

<!-- DataTables CSS -->
<link href="<%=basePath%>css/dataTables.bootstrap.css" rel="stylesheet">

<!-- Custom CSS -->
<link href="<%=basePath%>css/sb-admin-2.css" rel="stylesheet">

<!-- Custom Fonts -->
<link href="<%=basePath%>css/font-awesome.min.css" rel="stylesheet"
	type="text/css">
<link href="<%=basePath%>css/boot-crm.css" rel="stylesheet"
	type="text/css">


<script type="text/javascript" src="js/jquery-3.3.1.js"></script>
<!-- Bootstrap Core JavaScript -->
<script type="text/javascript" src="../crm32/js/bootstrap.js"></script>
<script type="text/javascript" src="../crm32/js/bootstrapValidator.js"></script>
<!-- Metis Menu Plugin JavaScript -->
<script type="text/javascript" src="../crm32/js/metisMenu.min.js"></script>
<script type="text/javascript" src="../crm32/js/GongWen.js"></script>
<!-- DataTables JavaScript -->
<script type="text/javascript"
	src="../crm32/js/jquery.dataTables.min.js"></script>
<script type="text/javascript"
	src="../crm32/js/dataTables.bootstrap.min.js"></script>
<script type="text/javascript" src="../crm32/js/pdfobject.js"></script>
<!-- Custom Theme JavaScript -->
<script type="text/javascript" src="../crm32/js/sb-admin-2.js"></script>

<!-- Bootstrap Core CSS -->

<link type="text/css" href="../crm32/css/bootstrapValidator.min.css"
	rel="stylesheet" />


</head>

<style>
#but {
	margin: 0 auto;
}

#but1 {
	margin: 0 auto;
}

a{
font-size:18px;
}


</style>

<body onload="myfunction()">

	

		<!-- Navigation -->
		<nav class="navbar navbar-default navbar-static-top" role="navigation" 
			style="margin-bottom: 0">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse"
				data-target=".navbar-collapse">
				<span class="sr-only">Toggle navigation</span> <span
					class="icon-bar"></span> <span class="icon-bar"></span> <span
					class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="Main">办公自动化系统 v1.0</a>
		</div>
		<!-- /.navbar-header -->
		<ul class="nav nav-tabs navbar-left">
			<li><a href="Main">首页</a></li>
			<li>
				<li class="dropdown"><a class="dropdown-toggle"
					data-toggle="dropdown">业务管理 <span class="caret"></span></a>
					<ul class="dropdown-menu">
						<li><a href="Approve">业务审批</a></li>
						<li><a href="Application">业务申请</a></li>
						<li><a href="ApplicationFind">业务查看</a></li>
					</ul></li>
				<li><a href="yuangong">员工管理</a></li>
				<li><a href="organization">部门管理</a></li>
				<li class="dropdown"><a class="dropdown-toggle"
					data-toggle="dropdown">会议管理 <span class="caret"></span></a>
					<ul class="dropdown-menu">	
						<li><a href="HuiYiAnPai">会议查看</a></li>
						<li><a href="HuiYiAnPaiSecond">会议申请记录</a></li>	
					</ul></li>
				<li><a href="Addresslist">通讯簿</a></li>
				<li class="active"><a href="GongWen">公文管理</a></li>
				
					<li class="dropdown"><a class="dropdown-toggle"
					data-toggle="dropdown">公告管理<span class="caret"></span></a>
					<ul class="dropdown-menu">
						<li><a href="GongGao">公告查看</a></li>
						<li><a href="GongGaoNew">新建公告</a></li>
					</ul></li>
		</ul>
		<ul class="nav navbar-top-links navbar-right">
			<li class="dropdown"><a class="dropdown-toggle"
				data-toggle="dropdown" href="#"> <i class="fa fa-envelope fa-fw"></i>
					<i class="fa fa-caret-down"></i>
			</a>
				<ul class="dropdown-menu dropdown-messages">
					<li><a href="#">
							<div>
								<strong>令狐冲</strong> <span class="pull-right text-muted">
									<em>昨天</em>
								</span>
							</div>
							<div>今天晚上向大哥找我吃饭，讨论一下去梅庄的事...</div>
					</a></li>
					<li class="divider"></li>
					<li><a class="text-center" href="#"> <strong>查看全部消息</strong>
							<i class="fa fa-angle-right"></i>
					</a></li>
				</ul> <!-- /.dropdown-messages --></li>
			<!-- /.dropdown -->
			<li class="dropdown"><a class="dropdown-toggle"
				data-toggle="dropdown" href="#"> <i class="fa fa-tasks fa-fw"></i>
					<i class="fa fa-caret-down"></i>
			</a>




				<ul class="dropdown-menu dropdown-tasks">
					<li><a href="#">
							<div>
								<p>
									<strong>任务 1</strong> <span class="pull-right text-muted">完成40%</span>
								</p>
								<div class="progress progress-striped active">
									<div class="progress-bar progress-bar-success"
										role="progressbar" aria-valuenow="40" aria-valuemin="0"
										aria-valuemax="100" style="width: 40%">
										<span class="sr-only">完成40%</span>
									</div>
								</div>
							</div>
					</a></li>
					<li class="divider"></li>
					<li><a href="#">
							<div>
								<p>
									<strong>任务 2</strong> <span class="pull-right text-muted">完成20%</span>
								</p>
								<div class="progress progress-striped active">
									<div class="progress-bar progress-bar-info" role="progressbar"
										aria-valuenow="20" aria-valuemin="0" aria-valuemax="100"
										style="width: 20%">
										<span class="sr-only">完成20%</span>
									</div>
								</div>
							</div>
					</a></li>
					<li class="divider"></li>
					<li><a class="text-center" href="#"> <strong>查看所有任务</strong>
							<i class="fa fa-angle-right"></i>
					</a></li>
				</ul> <!-- /.dropdown-tasks --></li>
			<!-- /.dropdown -->
			<li class="dropdown"><a class="dropdown-toggle"
				data-toggle="dropdown" href="#"> <i class="fa fa-bell fa-fw"></i>
					<i class="fa fa-caret-down"></i>
			</a>
				<ul class="dropdown-menu dropdown-alerts">
					<li><a href="#">
							<div>
								<i class="fa fa-comment fa-fw"></i> 新回复 <span
									class="pull-right text-muted small">4分钟之前</span>
							</div>
					</a></li>
					<li class="divider"></li>
					<li><a href="#">
							<div>
								<i class="fa fa-envelope fa-fw"></i> 新消息 <span
									class="pull-right text-muted small">4分钟之前</span>
							</div>
					</a></li>
					<li class="divider"></li>
					<li><a href="#">
							<div>
								<i class="fa fa-tasks fa-fw"></i> 新任务 <span
									class="pull-right text-muted small">4分钟之前</span>
							</div>
					</a></li>
					<li class="divider"></li>
					<li><a href="#">
							<div>
								<i class="fa fa-upload fa-fw"></i> 服务器重启 <span
									class="pull-right text-muted small">4分钟之前</span>
							</div>
					</a></li>
					<li class="divider"></li>
					<li><a class="text-center" href="#"> <strong>查看所有提醒</strong>
							<i class="fa fa-angle-right"></i>
					</a></li>
				</ul> <!-- /.dropdown-alerts --></li>
			<!-- /.dropdown -->
			<li class="dropdown"><a class="dropdown-toggle"
				data-toggle="dropdown" href="#"> <i class="fa fa-user fa-fw"></i>
					<i class="fa fa-caret-down"></i>
			</a>
				<ul class="dropdown-menu dropdown-user">
					<li><a href="yuangong"><i class="fa fa-user fa-fw"></i>
							员工管理</a></li>
					<li><a href="organization"><i class="fa fa-gear fa-fw"></i>
							部门管理</a></li>
					<li><a href="#"><i class="fa fa-gear fa-fw"></i>员工姓名：<%=request.getSession().getAttribute("ygname")%></a></li>
					<li><a href="#"><i class="fa fa-gear fa-fw"></i>员工工号：<%=request.getSession().getAttribute("ygid")%></a></li>
					<li><a href="#"><i class="fa fa-gear fa-fw"></i>用户名：<%=request.getSession().getAttribute("loginname")%></a></li>
					<li><a href="#"><i class="fa fa-gear fa-fw"></i>职位：<%=request.getSession().getAttribute("zhiwei")%></a>
					</li>
					<li><a href="#"><i class="fa fa-gear fa-fw"></i>部门：<%=request.getSession().getAttribute("organziation")%></a></li>
					<li class="divider"></li>
					<li><a href="tologin"><i class="fa fa-sign-out fa-fw"></i>
							退出登录</a></li>
				</ul> <!-- /.dropdown-user --></li>
			<!-- /.dropdown -->
		</ul>
		<!-- /.navbar-top-links -->





		<div class="navbar-default sidebar" role="navigation">
			<div class="sidebar-nav navbar-collapse">
				<ul class="nav" id="side-menu">
					<li class="sidebar-search">
						<div class="input-group custom-search-form">
							<input type="text" class="form-control" placeholder="查询内容...">
							<span class="input-group-btn">
								<button class="btn btn-default" type="button">
									<i class="fa fa-search" style="padding: 3px 0 3px 0;"></i>
								</button>
							</span>
						</div> <!-- /input-group -->
					</li>

					<li><a href="GongWen"><i class="fa fa-edit fa-fw"></i>公文查看</a></li>
					<li><a href="GongWenNew" class="active"><i
							class="fa fa-edit fa-fw"></i>新建公文</a></li>


				</ul>
			</div>
			<!-- /.sidebar-collapse -->
		</div>

		<!-- /.navbar-static-side --> </nav>


		<div id="page-wrapper">
		<div class="row">
<div class="col-lg-12">
					<h1 class="page-header">新建公文</h1>
			</div>
			</div>






			<center>


			

					<h4 class="modal-title" id="myModalLabel">新建公文项目</h4>
				
				<div class="modal-body">

					<form class="form-inline" id="myform"
						action="../crm32/insertGongWen" enctype="multipart/form-data"
						method="post" role="form">
						公文名称：
						<div class="input-group">
							<input type="text" class="form-control" id="gwname" name="gwname"
								placeholder="公文名称" />
						</div>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 公文编号：
						<div class="input-group">
							<input class="form-control" id="gwid" name="gwid" type="text"
								placeholder="公文编号" />
						</div>
						<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
						&nbsp;&nbsp; 上传人：
						<div class="input-group">

							<input class="form-control" id="updateman" name="updateman"
								type="text" placeholder="上传人"
								value="<%=request.getSession().getAttribute("ygname")%>" />
						</div>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 上传时间：
						<div class="input-group">

							<input class="form-control" id="updatetime" name="updatetime"
								value="<fmt:formatDate value='${now}' pattern="yyyy-MM-dd HH:mm:ss" />" />
						</div>
						<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						公文类型：
						<div class="input-group">

							<select class="form-control" id="gwtype" name="gwtype">
								<option value="">--请选择--</option>
								<c:forEach items="${gwtypeType}" var="item">
									<option value="${item.dict_item_name}"
										<c:if test="${item.dict_type_name== gwtype}"> selected</c:if>>${item.dict_item_name }</option>
								</c:forEach>
							</select>
						</div>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						上传文件:&nbsp;&nbsp;
						<div class="input-group">
							<input class="form-control" type="file" id="location"
								name="location" placeholder="文件名称" />
						</div>
						<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
						<center>
							<div class="input-group">
								<input type="submit" class="btn btn-primary" id="btn-ok"
									value="新建公文" />
							</div>
						</center>
					</form>
				</div>






			</center>

		</div>
	





</body>

<script type="text/javascript">
	function insert() {

		$.post("../crm32/insertGongWen", $("#insertForm").serialize(),
				function(data) {
					alert("新公文添加成功！");
					window.location.reload();
				});

	}
</script>


</html>
